/**
 * FileName: ConfigClientController
 * Author:   杨兴
 * Date:     2019/8/16 9:44
 * Description: 配置中心客户端
 */
package com.xiongmao.gongyu;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigClientController {

    @Value("${spring.datasource.url}")
    private String url;

    @RequestMapping(value = "dymaticGetUrl")
    public String dymaticGetUrl(){

        System.out.println(url);
        return url;
    }
}
